package org.test;

import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.widget.TabHost;

/*One of the main entry point of the application,  Once the user starts the applications this class is called 
 * All the tabs of the application are made here and displayed to the user
 * */
public class NewOrExisitingUserActivity extends TabActivity {

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		System.out.println("*******************");

		TabHost host = getTabHost();

		Resources r = getResources();

		System.out.println("Reached new tab!!!!");

		host.addTab(host.newTabSpec("Map").setIndicator("",
				r.getDrawable(R.drawable.icon)).setContent( //The login screen tab
				new Intent(this, ExistingUserLogInActivity.class).putExtra(
						"TAB", "Map")));
		host.addTab(host.newTabSpec("Map").setIndicator("",
				r.getDrawable(R.drawable.newuser)).setContent( // The register page tab
				new Intent(this, NewUserSignInActivity.class).putExtra("TAB",
						"Map")));
		host.addTab(host.newTabSpec("Map").setIndicator("",
				r.getDrawable(R.drawable.buy)).setContent(
				new Intent(this, DisplayCourseNumberPresentActivity.class)
						.putExtra("TAB", "Map"))); // The Buy tab
		host.addTab(host.newTabSpec("Map").setIndicator("",
				r.getDrawable(R.drawable.search)).setContent(
				new Intent(this, SearchBooksActivity.class).putExtra("TAB",
						"Map"))); //The search tab
	}
}